package com.YxyBackMange.Service.App.Impl;
import com.YxyBackMange.Entity.App.AppBanner;
import com.YxyBackMange.Mapper.App.AppBannerMapper;
import com.YxyBackMange.Service.App.AppBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class AppBannerServiceImpl implements AppBannerService{
	
	@Autowired
    private AppBannerMapper appBannerMapper;
    
   @Override
   public AppBanner insertService(AppBanner appBanner){
       appBanner.setCreateTime(new Date());
       appBannerMapper.insertSelective(appBanner);
       return appBanner;

   };
   @Override
   public AppBanner updateService(AppBanner appBanner){
       appBanner.setCreateTime(new Date());
       appBannerMapper.updateByPrimaryKeySelective(appBanner);

       return appBanner;
   };
    @Override
    public AppBanner update(AppBanner appBanner) {
        appBannerMapper.updateByPrimaryKeySelective(appBanner);
        return appBanner;
    }
   @Override
   public AppBanner delete(AppBanner appBanner){

	     appBannerMapper.delete(appBanner);
        return appBanner;
   };
    @Override
    public AppBanner insert(AppBanner appBanner){

        appBannerMapper.insertSelective(appBanner);
        return appBanner;

        };
}
